class Animal {
  constructor(name) {
    this.name = name
  }
}

class Dog extends Animal {
  constructor(name, breed) {
    super(name) // 调用父类的构造函数
    this.breed = breed
  }
}

const dog = new Dog('Buddy', 'Labrador')
console.log(dog instanceof Dog)
console.log(dog instanceof Animal)
console.log(dog instanceof Object)
console.log(dog instanceof Array)
